<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css"/>
<link href="${ctx}/css/main/main.css" rel="stylesheet" type="text/css"/>
<body class="m_6">
<form action="user_managerUser.action" method="post">
<div id="main">
	<s:if test="pageData.total < 1">
	<div class="b_add font14 bg3">管理用户（${department.deptName }）</div>
	<div class="m_han font14">尚未定义用户</div>
</div>
	</s:if>
	<s:else>
	<div><font color="red">${info }</font> </div>
	<div class="b_add font14 bg3">管理用户（${department.deptName }）</div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab_1">
	  <tr>
		<td>序号</td>
	    <td>登陆帐号</td>
	    <td>用户姓名</td>
	    <td>部门</td>
	    <td>角色</td>
	    <td>操作</td>
	  </tr>
	  <s:iterator value="pageData.data" status="users" id="user">
	  <tr>
	    <td><s:property value="#user[0].userOrder"/></td>
        <td><s:property value="#user[0].userLogin"/></td>
        <td><s:property value="#user[0].userName"/></td>
        <td><s:property value="#user[1]"/></td>
        <td><s:property value="#user[2]"/></td>
        <td><a href="${ctx}/user/user_preModifyUser.action?user.userId=<s:property value="#user[0].userId"/>">[编辑]</a>
        <a href="#" onclick="clearPsw('<s:property value="#user[0].userId"/>');">[清空密码]</a>
        </td>
	  </tr>
	  </s:iterator>
	</table>
	<div class="fy01" align="center">
            <input type="hidden" value="<s:property value="pageData.page" />" name="pageData.page" id="page">
      		 <input type="hidden" value="<s:property value="department.deptId" />" name="user.deptId" >
      		 <input type="hidden"  name="user.userId" >
				共
				<s:property value="pageData.total" />
				条信息 每页
				<s:property value="pageData.size" />
				条 当前
				<s:property value="pageData.page" />
				/共
				<s:property value="pageData.totalPageCount" />
				页&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt;
				<a href="javascript:document.getElementById('page').value=1;MM_list();">首页</a>&nbsp;&nbsp;
				<s:if test="pageData.page >1 ">
					<a
						href="javascript:document.getElementById('page').value=parseInt(document.getElementById('page').value)-1;MM_list();">上一页</a>&nbsp;&nbsp;
      </s:if>
				<s:if
					test="pageData.page < pageData.totalPageCount">
					<a
						href="javascript:document.getElementById('page').value=parseInt(document.getElementById('page').value)+1;MM_list();">下一页</a>&nbsp;&nbsp;
      </s:if>
				<a
					href="javascript:<s:if test="#request.page.totalPageCount > 0">document.getElementById('page').value=<s:property value="#request.page.totalPageCount"/></s:if>;MM_list();">末页</a>
				&gt;&gt;
			</div>
			</s:else>
			<div class="b_add font14 bg3">新建用户（${department.deptName }）</div>
			<div align="center"><input  type="button" onclick="preCreateUser();" value="新建用户" class="log_f2">
			</div>
			</div>
			</form>
</body>
</html>
<script type="text/javascript">
<!--
function preCreateUser(){
window.location = "${ctx}/user/user!preCreateUser.action?user.userFlag=0&user.deptId=<s:property value='department.deptId'/>";

}

function MM_list(){
document.forms[0].submit();

}

function clearPsw(id){
document.forms[0].action ="${ctx}/user/user_clearPsw.action";
document.getElementById("user.userId").value = id;
document.forms[0].submit();
}
//-->
</script>
